package com.bean;

import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.List;
import java.util.Map;

import com.dao.staffDao;

public class test {

	public static void main(String[] args)throws Exception {
		staffDao dao = new staffDao();
		List<Map> list = dao.export();
		
		FileOutputStream out = new FileOutputStream(new File("F:/test.txt"));
		PrintStream ps = new PrintStream(out);
		
		List<Map> s = dao.export();
		String res = "";
		for(int i=0;i<list.size();i++) {
			Map m = list.get(i);
			res+=m.get("id")+"\t";
			res+=m.get("name")+"\t";
			res+=m.get("personid")+"\t";
			res+=m.get("sex")+"\t";
			res+=m.get("nation")+"\t";
			res+=m.get("face")+"\t";
			res+=m.get("department")+"\t";
			res+=m.get("education")+"\t";
			res+=m.get("contact")+"\t\n";
		}
		ps.print(res);
		ps.close();
		out.close();
		
	}

}
